<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
	body{
		background: #fff url() 0 0 no-repeat;
	}
	</style>
	<script type="text/javascript">

	document.write("<table border='1'>");

	for (var i = 9; i >= 1; i--) {
		document.write("<tr>");
			for (var a = 1; a <= i; a++) {
				if(a%2==1){
					document.write("<td style='background:red'>"+a+"*"+i+"="+i*a+"</td>");
				}else if(i%2==1){
					document.write("<td style='background:green'>"+a+"*"+i+"="+i*a+"</td>");
				}else{
					document.write("<td style='background:yellow'>"+a+"*"+i+"="+i*a+"</td>");
				}
			};
		document.write("</tr>");
	};


	document.write("</table>");




	</script>
</head>
<body>
	
</body>
</html>